﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using DataAccess;
using System.Data;

namespace Logic
{
    public class FS0101_SubLogic
    {
        FS0101_SubDataAccess fs0101_SubDataAccess = new FS0101_SubDataAccess();
        FS0101DataAccess fs0101DataAccess = new FS0101DataAccess();
        public string Save(string strUserID,string strPassword,string strUserType)
        {
            #region 判断用户是否存在
            DataTable dt = fs0101DataAccess.Search2(strUserID);
            if (dt != null && dt.Rows.Count > 0)
            {
                return "此用户已经存在！";
            }
            #endregion
            #region 不存在才会保存
            else
            {
                fs0101_SubDataAccess.Save(strUserID,strPassword,strUserType);
                return "";
            }
            #endregion
        }

    }
}
